#!/bin/sh
module="test_drv"
device="test_dev"
mode="664"
group="david"
rm -f /dev/${device}
/sbin/insmod -f ./$module.ko $* || exit 1
major = 'cat /proc/devices | awk "\\$2==\"$device\"{print \\$1}"'
mknod /dev/${device} c $major 0
chgrp $group /dev/${device}
chmod $mode /dev/${device}

